<template>
	<view :style="{width:width,height:height}">

	</view>
</template>

<script>
	export default {
		data() {
			return {
				wv: null,
			}
		},
		props: {
			currentWebview: {
				type: Object
			},
			width:{
				type:Number,
				default:200
			},
			height:{
				type:Number,
				default:260
			},
			id:{
				type:Number,
				default:0
			},
			name:{
				type:String,
				default:""
			}
		},
		mounted() {
			this.init()
		},
		methods: {
			init: function() {
				console.log(12134)
				const _this = this
				const id = this.id
				const name = this.name
				this.wv = plus.webview.create("", "custom-webview", {
					plusrequire: "none", 
					'uni-app': 'none',
					top: uni.getSystemInfoSync().statusBarHeight
				})
				this.wv.loadURL(`https://dx13.haoleen.com/vd.html?id=${id}&name=${name}`)
				this.wv.fullscreen = false
				this.wv.setStyle({
					width: this.width,
					height: this.height,
				})
				this.currentWebview.append(this.wv);

			}
		}
	}
</script>

<style>
</style>